#include <QtGui>
#include "qworld.h"

/**
 *	@author Stefan Weigert <stefan.weigert@mailbox.tu-dresden.de>
 */

void messageOutput ( QtMsgType type, const char *msg )
{
	switch ( type )
	{
		case QtDebugMsg:
			fprintf ( stderr, "Debug: %s\n", msg );
			break;
		case QtWarningMsg:
			fprintf ( stderr, "Warning: %s\n", msg );
			break;
		case QtCriticalMsg:
			fprintf ( stderr, "Critical: %s\n", msg );
			break;
		case QtFatalMsg:
			fprintf ( stderr, "Fatal: %s\n", msg );
			abort();
	}
}

int main ( int argc, char ** argv )
{
	qInstallMsgHandler ( messageOutput );

	QApplication app ( argc, argv );
	QWorld world;
	world.show();

	return app.exec();
}
